Optimal. Leaf size=47 \[ -\frac {\tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac {\sec (c+d x)}{a^2 d}+\frac {\sec ^3(c+d x)}{3 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3254, 2702,
308, 213} \begin {gather*} \frac {\sec ^3(c+d x)}{3 a^2 d}+\frac {\sec (c+d x)}{a^2 d}-\frac {\tanh ^{-1}(\cos (c+d x))}{a^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 308
Rule 2702
Rule 3254
Rubi steps
\begin {align*} \int \frac {\csc (c+d x)}{\left (a-a \sin ^2(c+d x)\right )^2} \, dx &=\frac {\int \csc (c+d x) \sec ^4(c+d x) \, dx}{a^2}\\ &=\frac {\text {Subst}\left (\int \frac {x^4}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{a^2 d}\\ &=\frac {\text {Subst}\left (\int \left (1+x^2+\frac {1}{-1+x^2}\right ) \, dx,x,\sec (c+d x)\right )}{a^2 d}\\ &=\frac {\sec (c+d x)}{a^2 d}+\frac {\sec ^3(c+d x)}{3 a^2 d}+\frac {\text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{a^2 d}\\ &=-\frac {\tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac {\sec (c+d x)}{a^2 d}+\frac {\sec ^3(c+d x)}{3 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 61, normalized size = 1.30 \begin {gather*} \frac {-\frac {\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {\sec (c+d x)}{d}+\frac {\sec ^3(c+d x)}{3 d}}{a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.25, size = 49, normalized size = 1.04
method | result | size |
derivativedivides | \(\frac {\frac {\ln \left (\cos \left (d x +c \right )-1\right )}{2}-\frac {\ln \left (1+\cos \left (d x +c \right )\right )}{2}+\frac {1}{3 \cos \left (d x +c \right )^{3}}+\frac {1}{\cos \left (d x +c \right )}}{d \,a^{2}}\) | \(49\) |
default | \(\frac {\frac {\ln \left (\cos \left (d x +c \right )-1\right )}{2}-\frac {\ln \left (1+\cos \left (d x +c \right )\right )}{2}+\frac {1}{3 \cos \left (d x +c \right )^{3}}+\frac {1}{\cos \left (d x +c \right )}}{d \,a^{2}}\) | \(49\) |
norman | \(\frac {\frac {4 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {8}{3 a d}-\frac {4 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}}{a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}\) | \(85\) |
risch | \(\frac {2 \,{\mathrm e}^{5 i \left (d x +c \right )}+\frac {20 \,{\mathrm e}^{3 i \left (d x +c \right )}}{3}+2 \,{\mathrm e}^{i \left (d x +c \right )}}{d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{a^{2} d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{a^{2} d}\) | \(96\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 59, normalized size = 1.26 \begin {gather*} -\frac {\frac {3 \, \log \left (\cos \left (d x + c\right ) + 1\right )}{a^{2}} - \frac {3 \, \log \left (\cos \left (d x + c\right ) - 1\right )}{a^{2}} - \frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{2} + 1\right )}}{a^{2} \cos \left (d x + c\right )^{3}}}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 70, normalized size = 1.49 \begin {gather*} -\frac {3 \, \cos \left (d x + c\right )^{3} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 3 \, \cos \left (d x + c\right )^{3} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 6 \, \cos \left (d x + c\right )^{2} - 2}{6 \, a^{2} d \cos \left (d x + c\right )^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\csc {\left (c + d x \right )}}{\sin ^{4}{\left (c + d x \right )} - 2 \sin ^{2}{\left (c + d x \right )} + 1}\, dx}{a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 107 vs.
\(2 (45) = 90\).
time = 0.43, size = 107, normalized size = 2.28 \begin {gather*} \frac {\frac {3 \, \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a^{2}} + \frac {8 \, {\left (\frac {3 \, {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {3 \, {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + 2\right )}}{a^{2} {\left (\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1\right )}^{3}}}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.09, size = 41, normalized size = 0.87 \begin {gather*} \frac {{\cos \left (c+d\,x\right )}^2+\frac {1}{3}}{a^2\,d\,{\cos \left (c+d\,x\right )}^3}-\frac {\mathrm {atanh}\left (\cos \left (c+d\,x\right )\right )}{a^2\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________